﻿namespace AladdinGameFramework.Download
{
    public sealed class DownloadAgentHelperCompleteEventArgs : GameFrameworkEventArgs
    {
        private readonly byte[] m_Bytes;
        /// <summary>
        /// 初始化下载代理辅助器完成事件新实例
        /// </summary>
        /// <param name="length">Length.</param>
        /// <param name="bytes">Bytes.</param>
        public DownloadAgentHelperCompleteEventArgs(int length, byte[] bytes)
        {
            Length = length;
            m_Bytes = bytes;
        }

        /// <summary>
        /// 获取下载的数据大小
        /// </summary>
        /// <value>The length.</value>
        public int Length
        {
            get;
            private set;
        }

        /// <summary>
        /// 获取下载数据流
        /// </summary>
        /// <returns>The bytes.</returns>
        public byte[] GetBytes()
        {
            return m_Bytes;
        }
    }
}
